package com.lyf.service;

import com.lyf.entity.Payment;
import com.lyf.entity.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @AUTHOR LYF
 * @DATE 2022/2/5
 * @VERSION 1.0
 * @DESC
 */
@Component
@FeignClient(value = "PAYMENT-SERVICE",fallback = PaymentFallbackService.class) //http://
public interface PaymentService {

    @GetMapping("/payment/create")
    ResponseResult<Payment> create(Payment payment);

    @GetMapping("/payment/get/{id}")
    ResponseResult<Payment> getPaymentById(@PathVariable(name = "id") Long id);

}
